package com.fowo.api.model.supplier.invoice.order;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 供应商发货单 导入导出辅助模型 */
@Getter
@Setter
public class SupplierInvoiceOrderExcelPo {

  @NotNull(message = "单号不能为空")
  @Size(max = 50, message = "单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*单号")
  private String supplierInvoiceOrder;

  @NotBlank(message = "采购单号不能为空")
  @Size(max = 50, message = "采购单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*采购单号")
  private String purchaseOrderCode;

  @Size(max = 50, message = "发货单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "发货单号")
  private String inoviceCode;

  @EnumsString(
    value = { "快递", "海运", "空运", "其他" },
    message = "运输方式的可用值为 “快递”, “海运”, “空运”, “其他” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "运输方式")
  private String transportMode;

  @Size(max = 50, message = "物流商长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "物流商")
  private String logisticsProvider;

  @Size(max = 50, message = "物流商单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "物流商单号")
  private String logisticsTrackingNumber;

  @Size(max = 50, message = "物流渠道长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "物流渠道")
  private String logisticsChannel;

  @Size(max = 50, message = "物流信息长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "物流信息")
  private String logisticsInfo;

  @Size(max = 50, message = "预计到货时间长度不能超过20")
  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "预计到货时间")
  private java.util.Date expectReachTime;

  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "实际发货时间")
  private java.util.Date realitySendTime;

  @Size(max = 50, message = "物流中心编码长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "物流中心编码")
  private String logisticsCenterCode;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "发货状态")
  private String invoiceStatus;

  @Size(max = 50, message = "物流状态长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "物流状态")
  private String logisticsStatus;

  @Size(max = 50, message = "负责人长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "负责人")
  private String principal;

  @Size(max = 50, message = "创建人长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "创建人")
  private String lxCreateUser;

  @ExcelProperty(value = "物流预计时效")
  private Integer logisticsExpectedAging;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "分摊方式")
  private String allocationType;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;
}
